<!DOCTYPE html>

<!--thymeleaf的命名空间-->
<html xmlns:th="http://www.thymeleaf.org"

      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>主页</title>

</head>
<body>
<h1>主页面</h1>

<hr>
<div th:if="session.loginUser==null">
    <a href="/login">登录</a>
</div>

<div shiro:hasPermission="user:add">
    <a th:href="@{user/add}">add</a>
</div>
<div shiro:hasPermission="user:update">
    <a th:href="@{user/update}">update</a>
</div>
<p th:text="${msg}" style="color: red"></p>

</body>
</html>